﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualBasic;

namespace DotNET4Study
{
    class FinancialStudy
    {
        public static void Exectue()
        {
            //Rate和NPer必须是相同的周期（比如都是月，或者都是年）
            double feePerMonthly= Financial.Pmt(0.02,24,5000,0,DueDate.EndOfPeriod);
            Console.WriteLine("每期还款为{0}",feePerMonthly);

            int monthNumber = 1;
            double feeSomeMonthly = Financial.PPmt(0.04, monthNumber, 12, 5000);
            Console.WriteLine("第{0}期还款中的本金为{1}", monthNumber, feeSomeMonthly);
        }
    }
}
